<%@ page import="bean.load" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="bean.doc" %>
<%--
  Created by IntelliJ IDEA.
  User: zhujun
  Date: 2023/1/7
  Time: 2:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <title>科室医生信息</title>
    <link rel="stylesheet" type="text/css" href="../css/table.css">
    <link rel="stylesheet" type="text/css" href="../css/register.css">
</head>
<body>
<%@include file="header2.jsp"%>
<br>
<%
    load ld = new load();
    String SQL = "select*from doc where doc_time!='1月7日'";
    ArrayList<doc> ar = ld.loaddoc(SQL);
    String n1,n2,n3,n4,n5,n6,n7,n8;
%>

<table>
    <tr>
        <th>医生编号</th>
        <th>姓名</th>
        <th>性别</th>
        <th>科室编号</th>
        <th>科室名称</th>
        <th>主治病症</th>
        <th>空闲时间</th>
        <th>费用</th>
        <th>预约</th>
        <th>取消预约</th>
    </tr>
    <%
        for(int i=0;i<ar.size();i++){
            n1=ar.get(i).getDoc_id();
            n2=ar.get(i).getDoc_name();
            n3=ar.get(i).getDoc_sex();
            n4=ar.get(i).getDept_id();
            n5=ar.get(i).getDept_name();
            n6=ar.get(i).getDoc_diseases();
            n7=ar.get(i).getDoc_time();
            n8=ar.get(i).getDoc_cost();
    %>
    <tr>
        <td><%=n1%></td>
        <td><%=n2%></td>
        <td><%=n3%></td>
        <td><%=n4%></td>
        <td><%=n5%></td>
        <td><%=n6%></td>
        <td><%=n7%></td>
        <td><%=n8%></td>
        <td><a href="">预约</a></td>
        <td><a href="ld.opert(SQL);">取消预约</a></td>
    </tr>
    <%
        }
    %>
</table>

<h3>预约医生</h3>
<div>
    <form action="${pageContext.request.contextPath}/Register1" method="post">
        <label for="fname">医生编号</label>
        <input type="text" id="fname" name="ur1" placeholder="输入编号">
        <br>
        <input type="submit" value="提交">
        <input type="reset" value="重置">
    </form>
</div>

<h3>取消预约医生</h3>
<div>
    <form action="${pageContext.request.contextPath}/Cancel1" method="post">
        <label for="fname">医生编号</label>
        <input type="text" id="fname1" name="ur1" placeholder="输入编号">
        <br>
        <input type="submit" value="提交">
        <input type="reset" value="重置">
    </form>
</div>
</body>
</html>

